from typing import List

from pydantic import BaseModel

headers = {
    "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9",
    "Accept-Encoding": "gzip, deflate",
    "Accept-Language": "zh-CN,zh;q=0.9,en;q=0.8",
    "Host": "paper.sciencenet.cn",
    "Upgrade-Insecure-Requests": "1",
    "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36"
}


class DownMonthsModel(BaseModel):
    target: str = ''  # __EVENTTARGET
    targument: str = ''  # __EVENTARGUMENT
    viewstate: str = ''  # __VIEWSTATE
    marks: List[str] = []


class PaperZGKXBSaveMonth(BaseModel):
    yearmonth: str = ''
    html: str = ''
    downdate: str = ''


class PaperZGKXBSaveDays(BaseModel):
    days: str = ''
    html: str = ''
    url: str = ''
    downdate: str = ''


# class PaperZGKXBSaveArticle(BaseModel):
#     id: str = ''
#     html: str = ''
#     url: str = ''
#     downdate: str = ''

class PaperZGKXBSaveArticle(BaseModel):
    days: str = ''
    id: str = ''
    html: str = ''
    url: str = ''
    downdate: str = ''
    title: str = ''
    author = ''
    palte_num: str = ''
    palte_title: str = ''
    version_num: str = ''
    index: str = ''

class ZGKXBParseSave4(BaseModel):
    djson: dict = dict()


class ZGKXBParse4(BaseModel):
    downdate: str = ''
    jsondicts: dict = dict()
    html: str = ''
    rawid: str = ''
    batch: str = ''